<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
</head>
<body>
    <form method="post" enctype="multipart/form-data">
        {{ form.hidden_tag() }}
        {{ form.photo() }}
        {% for error in form.photo.errors %}
            <span style="color: red;">{{ error }}</span>
        {% endfor %}
        {{ form.submit() }}
    </form>
    {% if img_url %}
        <img src="{{img_url}}" />
    {% endif %}
</body>
</html>